<template>
  <view class="box">
    <!--  -->
    <view class="box1">
      <view class="box11">
        <image src="../../static/image/mein.jpg" mode=""></image>
      </view>
      <view class="box12">
        <view class="box121">师傅名称</view>
        <view class="box122">上门时间: 2021-11-18 14:35:12</view>
      </view>
    </view>
    <!--  -->
    <view class="box2">
      <view class="">点击星星评分</view>
      <view class="box21">
        <uv-rate :count="count" v-model="value" active-color="#cf2d22" inactive-color="#cccccc" size="80rpx"></uv-rate>
      </view>
    </view>
    <!--  -->
    <view class="box3">
      <textarea value="" placeholder="请输入..." v-model="text"/>
      <view class="box31">
        <image src="/static/image/xj.png" mode=""></image>
      </view>
    </view>
    <!--  -->
    <view class="box4">
      <button class="btn" @click="tijiao">确认提交</button>
    </view>
  </view>
</template>

<script>
  import {
    uniRequest
  } from "../../utils/request.js"
  export default {
    data() {
      return {
        count: 5,
        value: 4,
        text: ''
      }
    },
    methods: {
      tijiao() {
        const id1 = this.$route.query.id
        const id = id1.replace(/\"/g, "");
        const assess = this.value
        const text = this.text
        console.log(id,assess,text)
        uniRequest('apa/add?server=1', function(err, data) {
          if (err) {
            // 错误
            console.log(err)
          } else {
            console.log('"成功了"', data)
          }
        }, 'POST', {
          assess: assess,
          master_id: id,
          text: text,
          image: '#'
        });
      }
    }
  }
</script>

<style lang="scss">
  @import url("lijipingj.scss");
</style>